package com.yi.mall.goods.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.yi.mall.common.utils.ResponseEnum;
import com.yi.mall.common.utils.Result;
import com.yi.mall.goods.service.impl.CategoryBrandServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zzy
 * @since 2025-07-10
 */
@RestController
@RequestMapping("/goods")
public class CategoryBrandController {
    @Autowired
    private CategoryBrandServiceImpl categoryBrandService;
    @GetMapping("/listBythree/{id}")
    public Result listBythree(@PathVariable Integer id){
        return Result.success(ResponseEnum.SUCCESS,categoryBrandService.listBythree(id));
    }
    @GetMapping("/listBytwo/{id}")
    public Result listBytwo(@PathVariable Integer id){
        return Result.success(ResponseEnum.SUCCESS,categoryBrandService.listBytwo(id));
    }
    @GetMapping("/listByone/{id}")
    public Result listByone(@PathVariable Integer id){
        return Result.success(ResponseEnum.SUCCESS,categoryBrandService.listByone(id));
    }

}
